#include "head_2.h" 
extern int dev_buzzer_fd;
void buzzer_open()
{
	struct input_event event;

	if ((dev_buzzer_fd = open ("/dev/event2", O_RDWR | O_NONBLOCK)) < 0)
	{
		printf ("Cann't open file /dev/beep\n");
	}
	printf ("pthread_buzzer is ok\n");

		//	ioctl (dev_buzzer_fd, BEEP_ON);
			event.type = EV_SND;
			event.code = SND_TONE;
			event.value = 100;
			write(dev_buzzer_fd, &event, sizeof(struct input_event));
			printf("**buzzer on\n");
	close(dev_buzzer_fd);
}
